# !/usr/bin/env python
# -*- coding:utf-8 -*-
# @FileName : p24.py
# @Time     : 2024/5/12 18:54
# @Author   : Robot-Zsj
"""
description:

伐木工

https://fcqian.blog.csdn.net/article/details/135268635


i:
10

o:
3 3 4
"""


class Wood:
    def __init__(self, profit, slices):
        self.profit = profit
        self.slices = slices


x = int(input())


def getResult():
    dp = [Wood(i, [i]) for i in range(x + 1)]

    for i in range(2, x + 1):
        for j in range(1, i):
            profit = dp[j].profit * dp[i - j].profit

            if profit > dp[i].profit or (
                    profit == dp[i].profit and
                    len(dp[i].slices) > len(dp[j].slices) + len(dp[i - j].slices)
            ):
                dp[i].profit = profit
                dp[i].slices.clear()
                dp[i].slices.extend(dp[j].slices)
                dp[i].slices.extend(dp[i - j].slices)

    dp[x].slices.sort()

    return " ".join(map(str, dp[x].slices))


print(getResult())
